package cn.momoshenchi.medicine.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

/**
 * 处方表
 * @TableName prescription_info
 */
@TableName(value ="prescription_info")
public class PrescriptionInfo implements Serializable {
    /**
     * 处方id
     */
    @TableId
    private String prescriptionId;

    /**
     * 机构id
     */
    private String orgId;

    /**
     * 患者id
     */
    private String userId;

    /**
     * 问诊id
     */
    private String consultId;

    /**
     * 处方类型，1西药，2中成药，3中草药
     */
    private String prescriptionType;

    /**
     * 开方医生id
     */
    private String doctorId;

    /**
     * 开方医生姓名
     */
    private String doctorName;

    /**
     * 开方时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 处方提交状态，0未提交 ，1已提交 
     */
    private String prescriptionStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 处方id
     */
    public String getPrescriptionId() {
        return prescriptionId;
    }

    /**
     * 处方id
     */
    public void setPrescriptionId(String prescriptionId) {
        this.prescriptionId = prescriptionId;
    }

    /**
     * 机构id
     */
    public String getOrgId() {
        return orgId;
    }

    /**
     * 机构id
     */
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    /**
     * 患者id
     */
    public String getUserId() {
        return userId;
    }

    /**
     * 患者id
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * 问诊id
     */
    public String getConsultId() {
        return consultId;
    }

    /**
     * 问诊id
     */
    public void setConsultId(String consultId) {
        this.consultId = consultId;
    }

    /**
     * 处方类型，1西药，2中成药，3中草药
     */
    public String getPrescriptionType() {
        return prescriptionType;
    }

    /**
     * 处方类型，1西药，2中成药，3中草药
     */
    public void setPrescriptionType(String prescriptionType) {
        this.prescriptionType = prescriptionType;
    }

    /**
     * 开方医生id
     */
    public String getDoctorId() {
        return doctorId;
    }

    /**
     * 开方医生id
     */
    public void setDoctorId(String doctorId) {
        this.doctorId = doctorId;
    }

    /**
     * 开方医生姓名
     */
    public String getDoctorName() {
        return doctorName;
    }

    /**
     * 开方医生姓名
     */
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    /**
     * 开方时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 开方时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 处方提交状态，0未提交 ，1已提交 
     */
    public String getPrescriptionStatus() {
        return prescriptionStatus;
    }

    /**
     * 处方提交状态，0未提交 ，1已提交 
     */
    public void setPrescriptionStatus(String prescriptionStatus) {
        this.prescriptionStatus = prescriptionStatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PrescriptionInfo other = (PrescriptionInfo) that;
        return (this.getPrescriptionId() == null ? other.getPrescriptionId() == null : this.getPrescriptionId().equals(other.getPrescriptionId()))
            && (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getConsultId() == null ? other.getConsultId() == null : this.getConsultId().equals(other.getConsultId()))
            && (this.getPrescriptionType() == null ? other.getPrescriptionType() == null : this.getPrescriptionType().equals(other.getPrescriptionType()))
            && (this.getDoctorId() == null ? other.getDoctorId() == null : this.getDoctorId().equals(other.getDoctorId()))
            && (this.getDoctorName() == null ? other.getDoctorName() == null : this.getDoctorName().equals(other.getDoctorName()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getPrescriptionStatus() == null ? other.getPrescriptionStatus() == null : this.getPrescriptionStatus().equals(other.getPrescriptionStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPrescriptionId() == null) ? 0 : getPrescriptionId().hashCode());
        result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getConsultId() == null) ? 0 : getConsultId().hashCode());
        result = prime * result + ((getPrescriptionType() == null) ? 0 : getPrescriptionType().hashCode());
        result = prime * result + ((getDoctorId() == null) ? 0 : getDoctorId().hashCode());
        result = prime * result + ((getDoctorName() == null) ? 0 : getDoctorName().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getPrescriptionStatus() == null) ? 0 : getPrescriptionStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", prescriptionId=").append(prescriptionId);
        sb.append(", orgId=").append(orgId);
        sb.append(", userId=").append(userId);
        sb.append(", consultId=").append(consultId);
        sb.append(", prescriptionType=").append(prescriptionType);
        sb.append(", doctorId=").append(doctorId);
        sb.append(", doctorName=").append(doctorName);
        sb.append(", createTime=").append(createTime);
        sb.append(", prescriptionStatus=").append(prescriptionStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}